package com.zyz.B_流程控制.键盘录入;

import java.util.Scanner;

/**
 * @author: vick
 * @Date: 2025/3/11
 * @Description:
 * @version: 1.0
 */
public class Demo2 {
    public static void main(String[] args) {
        //创建scanner对象
        Scanner scanner = new Scanner(System.in);

        System.out.println("请输入你的用户名");
        String username = scanner.nextLine();

        System.out.println("请输入你的年龄");
        int age = scanner.nextInt();

        System.out.println("请输入你的身高");
        double height = scanner.nextDouble();

        System.out.println("用户名：" + username);
        System.out.println("年龄：" + age);
        System.out.println("身高：" + height);

        //关闭scanner
        scanner.close();
    }
}
